Method and apparatus for enhanced anti-aliasing filtering on a gpu

ABSTRACT

Techniques are described for a method for reducing aliasing artefacts in an output image, comprising obtaining a plurality of input images captured by a plurality of cameras, each camera having a different field of view of an environment surrounding a vehicle, wherein the plurality of input images are being mapped to the output image such that the output image represents the environment from a predefined virtual point of view. In addition, the techniques include for each pixel position in the output image, obtaining a first pixel density value corresponding to a first output pixel position in the output image; and upon determining that the first pixel density value is higher than a threshold, calculating a first output brightness value corresponding to the first output pixel position based at least on a plurality of brightness values corresponding to a plurality of neighboring pixels of a corresponding position in a first input image of the plurality of input images.

BACKGROUND

Aspects of the present disclosure relate to a method for enhancedanti-aliasing while mapping one or more input images to an output image.In particular, the method is suited for use on a graphics processingunit.

In multi-camera automotive vision systems, two or more cameras capturedifferent views of an environment surrounding a vehicle. These imagesare processed and mapped to a target viewport to generate an outputimage corresponding to a virtual point of view. Each of the input imagesgo through a different transformation in the mapping process, therefore,different parts of the input images undergo different degrees ofsub-sampling or up-sampling. The transformation process can introducevisual artefacts in highly detailed image content, such as small whitestones.

In recent years, GPUs (Graphics Processing Units) have become thehardware of choice in video processing applications. GPUs are highlyoptimized for video rendering with complex geometrical transformations.However, simple filtering operations that were relatively easy toimplement on digital signal processing (DSP) architectures in real-time,are more difficult to implement on GPU architectures. Consequently,image processing operations need to be redesigned on GPU devices forreal-time performance. There is a need in the art for methods oftransforming one or more input images using a GPU to generate an outputimage with minimal aliasing effects.

BRIEF SUMMARY

Methods, apparatuses, and computer-readable media are disclosed forreducing aliasing artefacts in an output image. In one embodiment, themethod includes obtaining a plurality of input images captured by aplurality of cameras, each camera having a different field of view of anenvironment surrounding a vehicle. The plurality of input images arebeing mapped to the output image such that the output image representsthe environment from a predefined virtual point of view. The methodfurther includes for each pixel position in the output image, obtaininga first pixel density value corresponding to a first output pixelposition in the output image, and upon determining that the first pixeldensity value is higher than a threshold, calculating a first outputbrightness value corresponding to the first output pixel position basedat least on a plurality of brightness values corresponding to aplurality of neighboring pixels of a corresponding position in a firstinput image of the plurality of input images.

In one embodiment, the method further includes upon determining that thefirst pixel density value is equal to or lower than a threshold,calculating the first output brightness value corresponding to theoutput pixel position based on a brightness value of a pixel in theinput image corresponding to the first pixel position in the outputimage.

In one embodiment, the method further includes obtaining the first pixeldensity value corresponding to the first pixel position of the outputimage comprises selecting a second pixel directly to the left of thefirst pixel position, and selecting a third pixel directly to the rightof the first pixel position in the output image, determining a secondinput pixel position and a third input pixel position in the first inputimage, corresponding to the second and third pixel positions in theoutput image, respectively. And, calculating a first distance valuebetween the second input pixel position and the third input pixelposition. The method further includes selecting a fourth pixel directlyabove the first pixel, selecting a fifth pixel directly to the bottom ofthe first pixel, determining a fourth input pixel position and a fifthinput pixel position in the first input image, corresponding to thefourth and fifth pixel positions in the output image, respectively,calculating a second distance value between the fourth input pixelposition and the fifth input pixel position, and calculating the pixeldensity corresponding to the first pixel as a function of a maximum ofthe first distance value and the second distance value.

In one embodiment, obtaining the pixel density includes receiving apredetermined pixel density value corresponding to the first pixellocation in the output image.

In one embodiment, the first pixel density value represents a measure ofthe number of pixels in an input image that is mapped between a firstpixel in the output image and a second pixel directly adjacent to thefirst pixel.

In one embodiment, determining the first output pixel brightness valuecomprises calculating the first output brightness value as a weightedaverage of a plurality of brightness values corresponding to a pluralityof neighboring pixel values in the first input image.

In one embodiment, a weight corresponding to each brightness value iscalculated based on a distance between a position in the first inputimage corresponding to the first output pixel and each of four pixelsdirectly adjacent to the position in the first input image.

In one embodiment, the plurality of brightness values includeprefiltered brightness values corresponding to each of the plurality ofthe neighboring pixel values in the first input image. The prefilteredbrightness values are calculated by a graphics processing unit (GPU) bymeans of bilinear interpolation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example vehicle comprising a camera system and agraphics processing unit, in accordance with certain embodiments of thepresent disclosure.

FIG. 2 illustrates example images captured by different cameras of thevehicle that can be used as inputs to the enhanced anti-aliasing filter,in accordance with certain embodiments of the present disclosure.

FIG. 3 illustrates a target viewport used for generating an exampleoutput image by mapping multiple input images, in accordance withcertain embodiments of the present disclosure.

FIG. 4 illustrates an example density map representing pixel densityvalues of different pixels of an output image relative to the vehicle,in accordance with certain embodiments of the present disclosure.

FIG. 5 illustrates example operations that may be performed for enhancedanti-aliasing filtering of an image, in accordance with certainembodiments of the present disclosure.

FIG. 6 illustrates an example output image generated by geometricaltransformation of an input image, in accordance with certain embodimentsof the present disclosure.

FIG. 7 illustrates an example input image in pixel-level detail that canbe used as an input to the enhanced anti-aliasing system, in accordancewith certain embodiments of the present disclosure.

DETAILED DESCRIPTION

Several illustrative embodiments will now be described with respect tothe accompanying drawings, which form a part hereof. While particularembodiments, in which one or more aspects of the disclosure may beimplemented, are described below, other embodiments may be used andvarious modifications may be made without departing from the scope ofthe disclosure or the spirit of the appended claims.

It will be apparent to those skilled in the art that substantialvariations may be made in accordance with specific requirements. Forexample, customized hardware might also be used, and/or particularelements might be implemented in hardware, software (including portablesoftware), or both. Further, connection to other computing devices suchas network input/output devices may be employed.

In multi-camera automotive surround view vision systems, two or morecameras capture different views of an environment surrounding a vehicle.The captured images are transformed and mapped to a target viewport togenerate an output image corresponding to a virtual point of view. Theoutput image is usually a mosaic image that represents a point of viewfrom the predefined three-dimensional (3D) point on or around thevehicle (e.g., virtual point of view). Geometrical transformations foreach portion of the captured input images are determined based onposition of the corresponding camera (as well as its internalparameters) relative to the target plane and position of the virtualrender camera. In one example, for generating a top-view output image, avirtual camera is assumed to be above the vehicle looking from the topcentral position.

Each of the input images may go through a different transformation inthe mapping process. In addition, different parts of the input imagesmay undergo different degrees of sub-sampling or up-sampling. Thetransformations can introduce visual artefacts in highly detailed imagecontent, such as small white stones. The visual artefacts may be due to“Squeezing,” which may cause aliasing effects, and “Zooming,” which maycause blurring effects. Parts of the images that undergo significantsub-sampling in the mapping process are of special interest in thisdisclosure, since they may have the highest level of aliasing issues.Generally, areas in the image that are close to the cameras undergo thehighest degrees of size reduction. Aliasing is introduced when thecorresponding region of interest of the image contains highly detailedimage structures and undergoes size reduction.

The term “pixel density” is used herein to show a measure of thesqueezing or compression of image content when mapping an input image toan output image through a target viewport. In particular, the pixeldensity represents an amount of sub-sampling or up-sampling that theinput image undergoes while being projected to the target viewport fromthe perspective of the virtual point of view. For example, when a largearea of the input image is mapped to a very small area of the outputimage, the mapped image content is subject to very strong compression.Therefore, pixel density value associated with the corresponding pixelsin the output image is large. On the other hand, if a small area of theinput image is mapped to an equally sized area of the output image, theimage content that is mapped to the output image is not compressed.Therefore, the pixel density value associated with the correspondingpixels in the output image is considered to be very small.

The anti-aliasing filtering as described herein can be applied to allthe pixels of the output image or a certain group of pixels within apredefined region. The anti-aliasing filter may be adapted based on theparameters of the input image and/or pixel density corresponding to eachoutput pixel or a group of pixels within a predefined region of theoutput image (e.g., regions that have undergone resizing during themapping process). Furthermore, the method described herein can be usedto transform images from a single camera or multiple cameras, withoutdeparting from the teaching of the present disclosure.

In one embodiment, two or more images that are simultaneously capturedby different cameras of the vehicle can be mapped to correspondingregions of the viewport image and are merged together. The filtering canbe performed for each region of interest of the output images and/or foreach camera separately. Portions of the output images can be renderedand merged together to provide a single output image, such as a top viewimage or a bowl-view image. This final output image can then bedisplayed on a display device of the vehicle.

For generating a top-view image, the target viewport can be defined as aflat 2D plane, perpendicular to the vehicle's vertical axis. The virtualpoint of view can be chosen to be above the vehicle viewing downwardtoward the ground. In another example, the output image can also beprovided as a bowl view image, in which the target viewport constitutespart of a bowl or sphere. The virtual point of view can be in anyarbitrary 3D position above or around the vehicle looking at the innerpart of the bowl.

Graphics Processing Units (GPUs) are highly optimized processors forvideo rendering applications with complex geometrical transformations.However, simple filtering operations that were relatively simple toimplement on digital signal processor (DSP) architectures in real-timeare more difficult to implement on GPU architectures, even with commonlysupported drivers and available optimized functions. Consequently, theDSP-friendly operations for multi-camera video processing need to beredesigned for real-time performance on GPUs. In multi-camera automotivevision systems, final visual quality of the output image depends heavilyon supported video enhancement functionalities of the GPU and otherfiltering procedures (e.g., anti-aliasing).

FIG. 1 illustrates an example vehicle 110 including a camera system anda graphics processing unit, in accordance with certain embodiments ofthe present disclosure. The camera system is configured as a surroundview camera system and includes a front camera 120, a right mirrorcamera 125, a rear camera 130, and a left mirror camera 135 and a GPU150. Each of these cameras can be configured as a wide angle camera andmay include a fisheye lens or similar optics. Therefore, a large fieldof view can be captured by each of the cameras. In this example, thefront camera 120 has field of view FOV1, which is illustrated bycorresponding borderlines. Similarly, the rear camera 130, left mirrorcamera 135 and right mirror camera 125 have corresponding field of viewsFOV2, FOV3, and FOV4, respectively. Each of the cameras is configured tocapture a portion of the surrounding environment of the vehicle 110.Moreover, the respective fields of views FOV1, FOV2, FOV3, and FOV4overlap with each other. The camera system also comprises an imageprocessing module to process the captured images. In one example, theimage processing module may be a GPU 150 that maps the captured imagesto a target viewport, such as a 3D bowl or a flat 2D plane. The GPU maymerge the images and render them on the target viewport from apredefined virtual camera point of view. Example images captured by thecameras around the vehicle are illustrated in FIG. 2. Each of theseimages may be mapped to a specific portion of the target viewport.

FIGS. 2A, 2B, 2C and 2D illustrate example images captured by differentcameras of the camera system, in accordance with certain embodiments ofthe present disclosure. FIG. 2A illustrates the image captured by thefront camera. Similarly, FIGS. 2B, 2C and 2D illustrate images capturedby the rear camera, left mirror camera and right mirror camera,respectively. Each of these images is mapped to a specific portion ofthe output view port, as shown in FIG. 3.

FIG. 3 illustrates a target viewport 300 for generating an exampleoutput image by mapping multiple input images, in accordance withcertain embodiments of the present disclosure. As illustrated, thetarget view port 300 is divided into several sections. Each sectioncorresponds to the images captured by one of the cameras around thevehicle. For example, section 310 corresponds to the front camera 120,section 320 corresponds to the rear camera 125, section 330 correspondsto left mirror camera 130 and section 340 corresponds to the rightmirror camera 140. In one example, the input image captured by the frontcamera is mapped to section 310 of the target view port using apredefined geometrical transformation. Similarly, images captured byrear camera, left mirror camera and right mirror cameras are mapped tosections 320, 330 and 340, respectively. The geometrical transformationthat is applied to each input image corresponding to each sectiondepends on the location of the virtual camera (e.g., virtual point ofview) in relation to the position of the real camera that has capturedthe input image. The geometrical transformation may also depend oninternal parameters of the capturing cameras. The mapped images may bemerged together to generate an output image corresponding to a top viewimage. Thus, different parts of the input images undergo differentdegrees of sub-sampling or up-sampling, which can introduce visualartefacts in cases of highly detailed image content. The visualartefacts may be caused by squeezing and/or zooming. In one embodiment,visual artefacts caused by squeezing could be much more visible. Theareas 315, 325, 335 and 345 in these output images represent areas inthe images that undergo significant sub-sampling during the mappingprocess. These areas 315, 325, 335 and 345 that are very close to therespective cameras 120, 125, 130 and 135, undergo the highest degrees ofresizing (e.g., size reduction). Size reduction causes aliasing in theimages, especially when the corresponding images contain highly detailedstructures, for example small white stones.

To reduce or compensate such aliasing effects, the GPU 150 may performanti aliasing filtering to generate each of the respective outputimages. Using a GPU device has a variety of advantages for multi-camerasystem. A GPU facilitates real-time design of multi-camera visionsystems using multiple views with easily varied surface shapes andrender camera characteristics. This is because GPU devices areparticularly friendly towards rendering operations and geometrictransformations that most often in a digital signal processor (DSP) aredifficult to design and implement in real-time. As a result, free-viewmulti-camera visualization in 3D has become feasible and available incurrent automotive embedded systems. However, on the other hand, simplefiltering operations that were relatively simple to implement on DSP inreal-time, are more difficult in a GPU even with commonly supporteddrivers and available optimized functions. Consequently, the DSPfriendly operations should be more carefully designed on GPU devices forreal-time performance. This is considered as highly important becausethe final visual quality of the multi-camera views depend heavily onsupported video enhancement for the input camera images and necessarygeometrical transformations for the multi-camera views. Advantageously,the invention and its embodiments allow for a real-time antialiasingscheme for multi-camera automotive systems based on GPU architectures,which is explained in more detail later. It should be noted thatalthough the invention is described with example automotive multi-camerasystems, the teachings herein could be applied to any type of camerasystem without departing from the teachings of the present disclosure.

FIG. 4 illustrates an example density map representing pixel densityvalues for different pixels of an output image, in accordance withcertain embodiments of the present disclosure. As illustrated, thedensity map 400 shows the pixel densities δ0, δ1, δ2 and δ3, for eachpixel region in the output images 310, 320, 330 and 340 relative to thevehicle 110. For the purpose of illustration and for simplification onlyfew regions with different pixel densities δ0, δ1, δ2, and δ3 are shownin FIG. 4. Generally, the pixel density may also vary from pixel topixel very strongly and the pixel density can have far more than fourdifferent values. In one embodiment, each of the pixel densities δ0, δ1,δ2 and δ3 can range from zero to one, in which zero represents thelowest pixel density and one represents the highest pixel density. InFIG. 4, the pixel density δ3 in the region closest to the cameras is thehighest, (e.g., pixel density equal to one). Similarly, regions furtheraway from the cameras and the vehicle correspond to the pixel densityδ0, e.g., equal to zero. These pixel density values are utilized toenhance the anti-aliasing filtering procedure on a GPU as explained inmore detail later.

Certain embodiments disclose an enhanced antialiasing filtering methodthat selectively applies filtering to remove aliasing artefacts in theimage only when certain conditions are met. By applying theanti-aliasing filter in geometrical areas of the output viewport wherealiasing is suspected, the processing load and processing time arereduced without any noticeable change in quality of the output image. Inone example, the aliasing artefacts that need to be removed usuallyoccur in a top view image in areas where pixel density is high, andsignificant sub sampling occurs. Aliasing artefacts are expected wheninput images are mapped to the top view output image corresponding tohigh pixel density areas. Therefore, certain embodiments perform thefour-pixel GPU anti-aliasing filtering process when the pixel density ishigh and utilize a much simpler transformation when aliasing effect isnot expected. As a result, rendering time and operation cost of applyingthe aliasing filter is greatly reduced.

An anti-aliasing filter as described in DE102018121280 with commoninventors performs four pixel read operations of the input image togenerate each output pixel of the top view image. Strength of thisfilter is dependent on pixel density for the corresponding pixelposition. In this scheme, GPU optimized rendering features are used andfour pixel read operations are performed. The output pixel value in thisscheme has contribution from sixteen pixels rather than four pixels. Anoutput value with contribution from sixteen pixel values corresponds tostronger filtering in comparison to an output value that hascontribution from four pixels. Output value for the pixel of interest isdetermined by using GPU automatic bilinear interpolation, in addition tofour pixel read operations. The above anti-aliasing filtering methodutilizes optimized features of the GPU to reduce processing time andprovide an adequate reduction in aliasing. This method utilizes pixeldensity value, spatially local statistics and brightness values fromfour pixel samples (with automatically computed bilinear interpolationbased on adjustable coordinates) to obtain over-sampled 4×4anti-aliasing interpolation through adaptive weighted averaging of fourpixels. In one example, the weights are determined by a local contentadaptive manner and coordinate distances. Such a scheme is suited forreal-time multi-camera view rendering applications in automotive systemsbased on GPU devices with standardized supported drivers (which includea set of optimized functions). In this scheme, the higher the pixeldensity, the stronger the applied filtering.

Although the above method of filtering on GPU architectures provides anacceptable visual performance of removing the aliasing artefacts, itstill does not perform optimally in terms of the time spent on thefiltering operation. In this method, the GPU performs four pixel readoperations of the input image, for each output pixel of the top viewimage that will be sent to the output screen. It should be noted thatsince pixel read operations are expensive on GPU architectures, it isdesirable to reduce the number of pixel read operations as much aspossible.

Certain embodiments disclose an enhanced anti-aliasing filteringprocedure by minimizing the number of pixel read operations evenfurther. For example, by comparing the value of the pixel density foreach pixel location in the output image to a threshold, the filteringoperation may be performed when the pixel density is higher than thethreshold. If the pixel density is lower than the threshold, thefiltering procedure may only read one brightness value (instead of fourbrightness values), and output it as the brightness value of the outputpixel. This scheme can save a significant amount of processing time.Therefore will reduce the time cost of applying the anti-aliasingfilter.

As an example, the following pseudocode may be used for the enhancedanti-aliasing procedure:

if (pixelDensity > Threshold) {Do Filtering: Perform four pixel readsand determine final output value} else {Perform one pixel read, this isthe output value}

The enhanced anti-aliasing filter method presented herein results insignificant savings in terms of read operations in the GPU. As anexample, for the image shown in FIG. 4 with top-view output image with atotal of 236,430 pixels, four pixel read operations may be performed forpixel density values δ1, δ2, and δ3, which may result in 80,100 pixels.As a result, for (80,100/236,430) ˜33% of the pixels of the top-viewimage, four pixel read operation needs to be performed in theanti-aliasing filter and for the rest of the pixels corresponding topixel densities smaller than a threshold (e.g., pixel density=δ0), onlyone pixel read operation is performed. As a result, a reduction of 66%of processing load can be achieved compared to other implementations ofanti-aliasing filtering that perform at least four pixel read operationsfor all of the output pixels in the output viewport.

FIG. 5 illustrates example operations that may be performed for enhancedanti-aliasing filtering for an output image, in accordance with certainembodiments of the present disclosure. At 510, a plurality of inputimages are obtained. In one example, the plurality of input images arecaptured by a plurality of cameras, each camera having a different fieldof view of an environment surrounding a vehicle. The plurality of inputimages are being mapped to an output image such that the output imagerepresents the environment from a predefined virtual point of view.

At 520, for each pixel position in the output image, a first pixeldensity value corresponding to a first output pixel position in theoutput image is obtained. The first pixel density is compared with athreshold value. At 530, upon determining that the first pixel densityvalue is higher than the threshold, a first output brightness valuecorresponding to the first output pixel position is calculated based atleast on a plurality of brightness values corresponding to a pluralityof neighboring pixels of a corresponding position in a first input imageof the plurality of input images.

Furthermore, at 540, upon determining that the first pixel density valueis equal to or lower than a threshold, the first output brightness valuecorresponding to the output pixel position is calculated based on abrightness value of a pixel in the input image corresponding to thefirst pixel position in the output image.

In one embodiment, obtaining the first pixel density value correspondingto the first pixel position of the output image includes calculating thepixel density value by selecting a second pixel directly to the left ofthe first pixel position, and selecting a third pixel directly to theright of the first pixel position in the output image. In addition, themethod includes determining a second input pixel position and a thirdinput pixel position in the first input image corresponding to thesecond and third pixel positions in the output image, respectively.Next, a first distance value may be calculated between the second inputpixel position and the third input pixel position. A fourth pixel mayalso be selected directly above the first pixel, and a fifth pixel maybe selected directly below the first pixel. Similarly, a fourth inputpixel position and a fifth input pixel position in the first input imagemay be determined, each of which corresponds to the fourth and fifthpixel positions in the output image. Next, a second distance value iscalculated between the fourth input pixel position and the fifth inputpixel position. Furthermore, the pixel density corresponding to thefirst pixel is calculated as a function of a maximum of the firstdistance value and the second distance value.

In one embodiment, a predetermined pixel density value corresponding tothe first pixel location in the output image may be received. As anexample, the pixel density values corresponding to each of the outputpixels in an output view port can be determined in advance and saved ina memory. These values may then be read from the memory and used todetermine whether a strong filtering should be used on each specificoutput pixel. In general, the first pixel density value represents ameasure of the number of pixels in an input image that are mappedbetween a first pixel in the output image and a second pixel directlyadjacent to the first pixel. The higher the pixel density, the strongeranti-aliasing mechanism is needed.

In one embodiment, the first output pixel brightness value is determinedby calculating the first output brightness value as a weighted averageof a plurality of brightness values corresponding to a plurality ofneighboring pixel values in the first input image. As an example, aweight corresponding to each brightness value is calculated based on adistance between a position in the first input image corresponding tothe first output pixel and each of four pixels directly adjacent to theposition in the first input image.

In one embodiment, the plurality of brightness values includeprefiltered brightness values corresponding to each of the plurality ofthe neighboring pixel values in the first input image. The prefilteredbrightness values can be calculated by GPU using bilinear interpolationfunctions.

As explained above, because a strong resizing caused by significantsub-sampling intensifies the aliasing effect, it is advantageous toadapt the filtering to the degree of resizing. For this purpose, adensity map can be created, which indicates for each pixel in the outputimage the corresponding local pixel density of the input image.

Pixel Density Calculation:

In one embodiment, pixel density corresponding to each pixel in theoutput image is calculated as a maximum distance in the input imagebetween positions associated with neighbors of a pixel in the outputimage in vertical and horizontal directions. FIG. 6 illustrates theprocess of calculating pixel density in more detail.

FIG. 6 shows a schematic illustration of an input image 610, which ismapped by geometrical transformation T to a corresponding output image.In this example, size of the input image 610 is reduced in thetransformation process (e.g., the output image has reduced number ofpixels). As an example, if the input image has P pixels, and the outputimage has P′ pixels, P′<P. The local pixel density for a pixel P0′ inthe output image 620 can be determined with the following process.First, two neighboring pixels N1′ of the pixel of interest P0′ inhorizontal direction are identified in the output image 620. For each ofthe neighboring pixels N1′, a corresponding position C1 in the inputimage 610 can be determined. In FIG. 6, the position of each pixel isshown by a dot in the center of the pixel. For example, the position ofthe pixel P0′ is marked by C0′, and the positions of the two neighboringpixels N1′ are marked by C1′.

The positions C1 in the input image 610 corresponding to the twoidentified neighboring pixels N1′ in the output image 620 can becalculated by applying a suitable transformation function. As anexample, an inverse of the geometrical transformation T can be used onthe positions C1′ of the neighboring pixels N1′ in the output image 620to find the corresponding locations in the input image 610. Theseremapped pixel positions C1 in the input image 610 may not coincide withany integer pixel position but can be located anywhere in the inputimage 610. In one example, the positions C1 can be represented byfloating point coordinates with one decimal place. After finding thepositions C1, a distance d1 between the positions C1 in the input image610 is determined.

Next, a similar procedure is performed to identify two neighboringpixels N2′ of the pixel P0′ in vertical direction in the output image620 and calculate a distance d2 between corresponding positions in theinput image. The neighboring pixels N2′ are in positions C2′ in theoutput image, with corresponding positions C2 in the input image 610. Inthis procedure, the first distance d1 is a measure for horizontal pixeldensity, and the second distance d2 is a measure for the vertical pixeldensity at position C0′ in the output image 620. The larger thesedistances d1 and d2, the larger the corresponding pixel densities in theoutput image. Next, a final density value for the pixel of interest P0′is calculated based on a maximum of distances d1 and d2. The aboveprocedure can be performed for each pixel P′ of the output image 620 tocalculate their corresponding pixel density.

The first and second distances d1 and d2 are measures of the pixeldensity at the position of the pixel of interest in the output image inthe horizontal and vertical directions. By using a maximum of these twodistances, the worst-case scenario with regard to aliasing can be takeninto account while simplifying calculations. The pixel density value canbe calculated as a function of the maximum of the first and seconddistances. In one example, the maximum of the first and second distancecan be subject to a further transformation, which maps the maximumdistance value to a corresponding density value (e.g., within apredefined range, e.g., from zero to one).

In one example, a density value of zero may correspond to cases wheredistances between the neighboring pixels in horizontal and verticaldirections in the output image are equal to (or even larger than) thedistances between the corresponding positions in the input image. On theother hand, if the maximum of the first and second distance is greaterthan the distance between the horizontal and vertical neighboring pixelsin the output image, the corresponding density value may be consideredto be between zero and one.

GPU devices are supported by standard drivers and operating systems. Asan example, currently available optimized functions also include 2×2bilinear interpolation, in which the GPU efficiently accesses fourneighboring pixels and performs the interpolation. The bilinearinterpolation function uses the same number of processing cycles as asingle pixel read operation. The bilinear interpolation function may beused to extract information from four pixels without a need to performcostly read out operations on the GPU. Therefore, the brightness valuesthat are used to calculate a brightness value for a pixel of interest inthe output image can be provided by performing bilinear interpolation ona corresponding position in the input image and its neighboring pixels.By suitably choosing these positions, strength of the anti-aliasingfiltering can be adapted. Therefore, it is possible to utilizeinformation from a larger neighborhood surrounding a point of interestin the input image, and at the same time use a small number of read outoperations.

In addition, by performing filter operations for the pixel positionsthat are highly probable in terms of aliasing artefacts, the processingtime can be reduced even further. These enhancements to the surroundview automotive vision systems results in significant reduction inprocessing time of the enhanced anti-aliasing filter.

FIG. 7 illustrates an example input image in pixel-level detail that canbe used as an input to the enhanced anti-aliasing system, in accordancewith certain embodiments of the present disclosure. In this figure, eachpixel position of the input image is represented by a corresponding dotat the center of the pixel. In one embodiment, the output image may befiltered as described below with respect to pixel of interest P0′.First, a position C0 in the input image corresponding to the pixel P0′of the output image is identified, which is illustrated by a star inFIG. 7. Next, four immediate neighboring pixels to the position C0 areidentified in both horizontal and vertical directions. The neighborpixel at position C1 is considered to be part of a pixel group G1, whichincludes three other neighbors of C1 that do not have any overlap withany of the pixels at positions C2, C3 or C4.

Next, position of point M1 is determined as a function of pixel densityassociated with position C0′. The point M1 is assumed to be located on aline segment bounded by the position C1 and center of the group G1.Distance of point M1 from point C1 is determined as a function of pixeldensity value at position C0′. In one embodiment, distance of point M1may be a linear function of the pixel density value at position C0′. Ifpixel density value is equal to zero, M1 may overlap on C1 and if pixeldensity is equal to one, M1 may reside on the center point of group G1.By adjusting distance of point M1 from C1, strength of the anti-aliasingfiltering can be adjusted.

In addition, prefiltered brightness value of point M1 is calculated bybilinear interpolation of four brightness values of the pixels in GroupG1. The bilinear interpolation can be performed very efficiently usingthe Open Graphics Library (OpenGL) bilinear interpolation functionavailable for GPUs. It should be noted that by using the optimizedbilinear interpolation function of the GPU, although four brightnessvalues are used to calculate the brightness value of point M1, readingthese brightness values do not use the expensive read-out operation ofthe GPU (since these brightness values do not need to be available forfuture operations). In one embodiment, if the pixel density value isequal to zero, point M1 may overlap with C1. In this case, the bilinearinterpolation may be skipped and the prefiltered brightness value of M1may be considered equal to the brightness value of point C1. If thepixel density is smaller than a predetermined threshold, the brightnessvalue of point C1 may be output as the brightness value corresponding topixel of interest P0′. If pixel density value is equal to or larger thanthe threshold, similar procedure may be used to determine prefilteredbrightness values at three other points M2, M3 and M4 corresponding topixel positions C2, C3 and C4.

A weighted average of the prefiltered brightness values at points M1,M2, M3 and M4 may be calculated to generate the filtered brightnessvalue corresponding to pixel of interest P0′. Therefore, the extended4×4 pixel neighborhoods are covered for filtering by using only fourexpensive read out operations in case the pixel density is higher than athreshold (anti-aliasing filtering is needed). This proceduresignificantly reduces the processing time for rendering while providingadvanced visual quality in terms of aliasing artefacts. Thereby, thepixel access and bilinear interpolation functions can be used from theexisting and supported GPU OpenGL SGX drivers. The weights can becomputed based on distance between the neighbor pixel positions C3, C4,C5, C6 and the position C0 in the input image. In one embodiment, theweights may be computed using Euclidean distance. It should be notedthat the weights can be calculated using any other method withoutdeparting from the teachings of the present disclosure.

If the brightness values at the points M1, M2, M3 and M4 differ fromeach other considerably, this indicates that the input image containshighly detailed image structures, which may intensify the aliasingeffect. In one embodiment, in such a case a stronger filtering can beperformed, for example, by shifting the positions of the points M1, M2,M3 and M4 outwards, namely towards the respective group centers and/orby adapting the weights correspondingly.

The techniques disclosed herein allow for efficient antialiasingfiltering on GPU in real-time for multi-camera systems. Number of costlypixel readout operations are reduced by using pixel density informationcorresponding to an output position in the output view port. Theproposed method reduces the time required to perform anti-aliasingfiltering considerably without reducing quality of the output image.

With reference to the appended FIG.s, components that can include memorycan include non-transitory machine-readable media. The terms“machine-readable medium” and “computer-readable medium” as used hereinrefer to any storage medium that participates in providing data thatcauses a machine to operate in a specific fashion. In embodimentsprovided hereinabove, various machine-readable media might be involvedin providing instructions/code to processing units and/or otherdevice(s) for execution. Additionally or alternatively, themachine-readable media might be used to store and/or carry suchinstructions/code. In many implementations, a computer-readable mediumis a physical and/or tangible storage medium. Such a medium may takemany forms, including but not limited to, non-volatile media, volatilemedia, and transmission media. Common forms of computer-readable mediainclude, for example, magnetic and/or optical media, punch cards, papertape, any other physical medium with patterns of holes, a RAM, a PROM,EPROM, a FLASH-EPROM, any other memory chip or cartridge, a carrierwave, or any other medium from which a computer can read instructionsand/or code.

The methods, systems, and devices discussed herein are examples. Variousembodiments may omit, substitute, or add various procedures orcomponents as appropriate. For instance, features described with respectto certain embodiments may be combined in various other embodiments.Different aspects and elements of the embodiments may be combined in asimilar manner. The various components of the figures provided hereincan be embodied in hardware and/or software. Also, technology evolvesand, thus, many of the elements are examples that do not limit the scopeof the disclosure to those specific examples.

Having described several embodiments, various modifications, alternativeconstructions, and equivalents may be used without departing from thespirit of the disclosure. For example, the above elements may merely bea component of a larger system, wherein other rules may take precedenceover or otherwise modify the application of the embodiments. Also, anumber of steps may be undertaken before, during, or after the aboveelements are considered. Accordingly, the above description does notlimit the scope of the disclosure to the exact embodiments described.

What is claimed is:
 1. A method for reducing aliasing artefacts in anoutput image, comprising: obtaining a plurality of input images capturedby a plurality of cameras, each camera having a different field of viewof an environment surrounding a vehicle, wherein the plurality of inputimages are being mapped to the output image such that the output imagerepresents the environment from a predefined virtual point of view; foreach pixel position in the output image: obtaining a first pixel densityvalue corresponding to a first output pixel position in the outputimage; and upon determining that the first pixel density value is higherthan a threshold, calculating a first output brightness valuecorresponding to the first output pixel position based at least on aplurality of brightness values corresponding to a plurality ofneighboring pixels of a corresponding position in a first input image ofthe plurality of input images.
 2. The method of claim 1, furthercomprising: upon determining that the first pixel density value is equalto or lower than a threshold, calculating the first output brightnessvalue corresponding to the output pixel position based on a brightnessvalue of a pixel in the input image corresponding to the first pixelposition in the output image.
 3. The method of claim 1, whereinobtaining the first pixel density value corresponding to the first pixelposition of the output image comprises: selecting a second pixeldirectly to the left of the first pixel position, and selecting a thirdpixel directly to the right of the first pixel position in the outputimage; determining a second input pixel position and a third input pixelposition in the first input image, corresponding to the second and thirdpixel positions in the output image, respectively; calculating a firstdistance value between the second input pixel position and the thirdinput pixel position; selecting a fourth pixel directly above the firstpixel, and selecting a fifth pixel directly to the bottom of the firstpixel; determining a fourth input pixel position and a fifth input pixelposition in the first input image, corresponding to the fourth and fifthpixel positions in the output image, respectively; calculating a seconddistance value between the fourth input pixel position and the fifthinput pixel position; and calculating the pixel density corresponding tothe first pixel as a function of a maximum of the first distance valueand the second distance value.
 4. The method of claim 1, whereinobtaining the pixel density comprises: receiving a predetermined pixeldensity value corresponding to the first pixel location in the outputimage.
 5. The method of claim 1, wherein the first pixel density valuerepresents a measure of number of pixels in an input image that aremapped between the first pixel in the output image and a second pixeldirectly adjacent to the first pixel in the output image.
 6. The methodof claim 1, wherein determining the first output pixel brightness valuecomprises: calculating the first output brightness value as a weightedaverage of a plurality of brightness values corresponding to a pluralityof neighboring pixel values in the first input image.
 7. The method ofclaim 6, wherein a weight corresponding to each brightness value iscalculated based on a distance between a position in the first inputimage corresponding to the first output pixel and each of four pixelsdirectly adjacent to the position in the first input image.
 8. Themethod of claim 6, wherein the plurality of brightness values compriseprefiltered brightness values corresponding to each of the plurality ofthe neighboring pixel values in the first input image, wherein theprefiltered brightness values are calculated by a graphics processingunit (GPU) by means of bilinear interpolation.
 9. An apparatus forreducing aliasing artefacts in an output image, comprising at least oneprocessor coupled to a memory, the at least one processor is configuredto: obtain a plurality of input images captured by a plurality ofcameras, each camera having a different field of view of an environmentsurrounding a vehicle, wherein the plurality of input images are beingmapped to the output image such that the output image represents theenvironment from a predefined virtual point of view; for each pixelposition in the output image: obtain a first pixel density valuecorresponding to a first output pixel position in the output image; andupon determining that the first pixel density value is higher than athreshold, calculate a first output brightness value corresponding tothe first output pixel position based at least on a plurality ofbrightness values corresponding to a plurality of neighboring pixels ofa corresponding position in a first input image of the plurality ofinput images.
 10. The apparatus of claim 9, wherein the at least oneprocessor is further configured to: upon determining that the firstpixel density value is equal to or lower than a threshold, calculate thefirst output brightness value corresponding to the output pixel positionbased on a brightness value of a pixel in the input image correspondingto the first pixel position in the output image.
 11. The apparatus ofclaim 9, wherein the at least one processor configured to obtain thefirst pixel density value corresponding to the first pixel position ofthe output image is configured to: select a second pixel directly to theleft of the first pixel position, and selecting a third pixel directlyto the right of the first pixel position in the output image; determinea second input pixel position and a third input pixel position in thefirst input image, corresponding to the second and third pixel positionsin the output image, respectively; calculate a first distance valuebetween the second input pixel position and the third input pixelposition; select a fourth pixel directly above the first pixel, andselecting a fifth pixel directly to the bottom of the first pixel;determine a fourth input pixel position and a fifth input pixel positionin the first input image, corresponding to the fourth and fifth pixelpositions in the output image, respectively; calculate a second distancevalue between the fourth input pixel position and the fifth input pixelposition; and calculate the pixel density corresponding to the firstpixel as a function of a maximum of the first distance value and thesecond distance value.
 12. The apparatus of claim 9, wherein theprocessor configured to obtain the pixel density receives apredetermined pixel density value corresponding to the first pixellocation in the output image.
 13. The apparatus of claim 9, wherein thefirst pixel density value represents a measure of number of pixels in aninput image that are mapped between the first pixel in the output imageand a second pixel directly adjacent to the first pixel in the outputimage.
 14. The apparatus of claim 9, wherein the processor configured todetermine the first output pixel brightness value is further configuredto calculate the first output brightness value as a weighted average ofa plurality of brightness values corresponding to a plurality ofneighboring pixel values in the first input image.
 15. The apparatus ofclaim 14, wherein a weight corresponding to each brightness value iscalculated based on a distance between a position in the first inputimage corresponding to the first output pixel and each of four pixelsdirectly adjacent to the position in the first input image.
 16. Theapparatus of claim 14, wherein the plurality of brightness valuescomprise prefiltered brightness values corresponding to each of theplurality of the neighboring pixel values in the first input image,wherein the prefiltered brightness values are calculated by a graphicsprocessing unit (GPU) by means of bilinear interpolation.
 17. Acomputer-readable storage medium storing instructions that, whenexecuted by one or more processors, cause the one or more processors toperform the following: obtain a plurality of input images captured by aplurality of cameras, each camera having a different field of view of anenvironment surrounding a vehicle, wherein the plurality of input imagesare being mapped to the output image such that the output imagerepresents the environment from a predefined virtual point of view; foreach pixel position in the output image: obtain a first pixel densityvalue corresponding to a first output pixel position in the outputimage; and upon determining that the first pixel density value is higherthan a threshold, calculate a first output brightness valuecorresponding to the first output pixel position based at least on aplurality of brightness values corresponding to a plurality ofneighboring pixels of a corresponding position in a first input image ofthe plurality of input images.
 18. The computer-readable storage mediumof claim 17, wherein the instructions further cause the one or moreprocessors to: upon determining that the first pixel density value isequal to or lower than a threshold, calculate the first outputbrightness value corresponding to the output pixel position based on abrightness value of a pixel in the input image corresponding to thefirst pixel position in the output image.
 19. The computer-readablestorage medium of claim 17, wherein the instructions further cause theone or more processors to: select a second pixel directly to the left ofthe first pixel position, and selecting a third pixel directly to theright of the first pixel position in the output image; determine asecond input pixel position and a third input pixel position in thefirst input image, corresponding to the second and third pixel positionsin the output image, respectively; calculate a first distance valuebetween the second input pixel position and the third input pixelposition; select a fourth pixel directly above the first pixel, andselecting a fifth pixel directly to the bottom of the first pixel;determine a fourth input pixel position and a fifth input pixel positionin the first input image, corresponding to the fourth and fifth pixelpositions in the output image, respectively; calculate a second distancevalue between the fourth input pixel position and the fifth input pixelposition; and calculate the pixel density corresponding to the firstpixel as a function of a maximum of the first distance value and thesecond distance value.
 20. The computer-readable storage medium of claim17, wherein the first pixel density value represents a measure of numberof pixels in an input image that are mapped between the first pixel inthe output image and a second pixel directly adjacent to the first pixelin the output image.